import { type BasePredictionResult } from "./PredictionResult.js";

/**
 * Represents the result of a prediction from a generator plugin.
 *
 * The most notably property is {@link GeneratorPredictionResult#content}, which contains the
 * generated text.
 *
 * @public
 * @experimental [EXP-GEN-PREDICT] Using generator plugins programmatically is still in development.
 * This may change in the future without warning.
 */
export class GeneratorPredictionResult implements BasePredictionResult {
  public constructor(
    /**
     * The newly generated text as generated by the generator plugin.
     */
    public readonly content: string,
    /**
     * Part of the generated text that is "reasoning" content. For example, text inside <think>
     * tags. The generator is responsible for determining what is considered reasoning content.
     */
    public readonly reasoningContent: string,
    /**
     * Part of the generated text that is not "reasoning" content. For example, text outside
     * <think> tags. The generator is responsible for determining what is considered reasoning
     * content.
     */
    public readonly nonReasoningContent: string,
    /**
     * The identifier of the plugin that generated this result.
     */
    public readonly pluginIdentifier: string,
  ) {}
}
